PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Fing/ParsedTypes.fs

http://github.com/sandersn/fing
F# | 15 lines | 7 code | 3 blank | 5 comment | 0 complexity | 21ab11834135662e0a3e79d472c4ad21 MD5 | raw file
 1// Copyright (c) 2010, Nathan Sanders
 2// Licence: New BSD. See accompanying documentation.
 3
 4
 5/// code specific to types parsed from user text
 6module ParsedTypes
 7open Types
 8
 9// WHOA! Hardcoding aliases into a map called 'aliases' is a terrible idea!
10// TODO: Fix this to search FSharp.Core for aliases and store them.
11let dealias =
12  let dealias' = function
13  | Id id when Map.containsKey id aliases -> Some (Id (Map.find id aliases))
14  | _ -> None
15  Types.map dealias' id  // might need to use something besides id someday