psc-ide 0.6.0 → 0.6.1
raw patch · 2 files changed
+8/−8 lines, 2 files
Files
- psc-ide.cabal +1/−1
- src/PureScript/Ide/CaseSplit.hs +7/−7
psc-ide.cabal view
@@ -1,5 +1,5 @@ name: psc-ide-version: 0.6.0+version: 0.6.1 synopsis: Language support for the PureScript programming language description: Please see README.md homepage: http://github.com/kRITZCREEK/psc-ide
src/PureScript/Ide/CaseSplit.hs view
@@ -104,13 +104,13 @@ prettyWildcard :: Type -> Text prettyWildcard t = "( _ :: " <> T.strip (T.pack (prettyPrintTypeAtom t)) <> ")" -makePattern ::- Text -> -- ^ current line- Int -> -- ^ begin of the split- Int -> -- ^ end of the split- WildcardAnnotations -> -- ^ Whether to explicitly type the splits- [Constructor] -> -- ^ constructors to split- [Text]+-- | Constructs Patterns to insert into a sourcefile+makePattern :: Text -- ^ Current line+ -> Int -- ^ Begin of the split+ -> Int -- ^ End of the split+ -> WildcardAnnotations -- ^ Whether to explicitly type the splits+ -> [Constructor] -- ^ Constructors to split+ -> [Text] makePattern t x y wsa = makePattern' (T.take x t) (T.drop y t) where makePattern' lhs rhs = map (\ctor -> lhs <> prettyCtor wsa ctor <> rhs)