code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
module React.Flux.Mui.GridList.GridTile where
import Protolude
import Data.Aeson
import Data.Aeson.Casing
import Data.String (String)
import React.Flux
import React.Flux.Mui.Types
import React.Flux.Mui.Util
data GridTile = ... | pbogdan/react-flux-mui | react-flux-mui/src/React/Flux/Mui/GridList/GridTile.hs | bsd-3-clause | 1,256 | 0 | 15 | 200 | 364 | 203 | 161 | 45 | 1 |
{-# LANGUAGE CPP #-}
module Test.Unit.UserStory (
tests
) where
import Control.Monad.Trans (lift)
import qualified Data.Map as Map
import Prelude hiding (log)
import Data.Time.Clock
import Bead.Controller.ServiceContext
import Bead.Controller.UserStories as U
i... | andorp/bead | test/Test/Unit/UserStory.hs | bsd-3-clause | 4,689 | 0 | 20 | 1,061 | 1,340 | 663 | 677 | 111 | 4 |
module Main where
import Numeric.LinearAlgebra
import Numeric.Morpheus
a = matrix 5 [
71, 11, 3, -9, -7,
21, -7, -2, 23, 11,
-11, 32, 53, -49, 37,
1, -24, 78, 90, 17
]
main :: IO ()
main = do
putStrLn "\nNumeric.Morpheus.MatrixReduce functions: "
putStr "sum of elements of rows: "
print $ rowS... | Alexander-Ignatyev/morpheus | hmatrix-morpheus/examples/Main.hs | bsd-3-clause | 958 | 0 | 10 | 215 | 311 | 147 | 164 | 32 | 1 |
{-# LANGUAGE FlexibleInstances, GeneralizedNewtypeDeriving#-}
module Fibon.Analyse.Metrics (
MemSize(..)
, ExecTime(..)
, Estimate(..)
, ConfidenceInterval(..)
, Measurement(..)
, Metric(..)
, PerfData(..)
, pprPerfData
, RawPerf(..)
, NormPerf(..)
, BasicPerf(..)
, mkPointEstimate
, rawPerf... | dmpots/fibon | tools/fibon-analyse/Fibon/Analyse/Metrics.hs | bsd-3-clause | 3,714 | 0 | 14 | 914 | 1,105 | 592 | 513 | 89 | 1 |
module Text.Highlighting.Illuminate
( tokenize
, Lexer(..)
, lexers
, lexerByName
, lexerByFilename
, module Text.Highlighting.Illuminate.Format ) where
import Data.Char (toLower)
import Data.List (find)
import Data.Sequence (singleton)
import System.FilePath
import... | jgm/illuminate | Text/Highlighting/Illuminate.hs | bsd-3-clause | 3,200 | 0 | 12 | 606 | 623 | 405 | 218 | 66 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Test.Complex.Query (specComplexQuery) where
import Test.Hspec
import Test.Data.Entity
import Complex.Entity
import Complex.Query
specComplexQuery :: Spec
specComplexQuery = do
describe "Entity Class" $ do
context "with valid one" $ do
it "returns the table name" ... | yulii/complex | test/Test/Complex/Query.hs | bsd-3-clause | 2,277 | 0 | 19 | 624 | 119 | 76 | 43 | 12 | 1 |
{-# LANGUAGE ForeignFunctionInterface #-}
-------------------------------------------------------------------------------
-- |
-- Copyright : (c) 2015 Michael Carpenter
-- License : BSD3
-- Maintainer : Michael Carpenter <oldmanmike.dev@gmail.com>
-- Stability : experimental
-- Portability : portable
--
-... | oldmanmike/CsoundRaw | src/Sound/Csound/GeneralIO.hs | bsd-3-clause | 2,841 | 0 | 11 | 416 | 785 | 388 | 397 | 38 | 1 |
{-# LANGUAGE Safe #-}
{- arch-tag: ConfigParser lexer support
Copyright (C) 2004, 2008 John Goerzen <jgoerzen@complete.org>
Copyright (C) 2015-2016 David Farrell <shokku.ra@gmail.com>
-}
{- |
Module : Polar.ConfigFile.Lexer
Copyright : Copyright (C) 2004, 2008 John Goerzen, 2015-2016 David Farrell
Lic... | polar-engine/polar-configfile | src/Polar/ConfigFile/Lexer.hs | bsd-3-clause | 3,812 | 0 | 13 | 988 | 832 | 424 | 408 | 75 | 1 |
-- This supports all the operations of the other ones, but it uses
-- a typical matrix representation.
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Data.Sparse.ReferenceMatrix
(RefMatrix
,toSparseBitM
,sparseSet
,Data.Sparse.ReferenceMatrix.getCol
,Data.Sparse.Refe... | ku-fpg/ecc-ldpc | src/Data/Sparse/ReferenceMatrix.hs | bsd-3-clause | 2,294 | 0 | 14 | 547 | 946 | 512 | 434 | 66 | 2 |
{-# LANGUAGE CPP, DeriveFunctor, ViewPatterns, BangPatterns #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
module TcFlatten(
FlattenMode(..),
flatten, flattenKind, flattenArgsNom,
rewriteTyVar,
unflattenWanteds
) where
#include "HsVersions.h"
import GhcPrelude
import TcRnTypes
import TyCoPpr ... | sdiehl/ghc | compiler/typecheck/TcFlatten.hs | bsd-3-clause | 75,031 | 127 | 31 | 23,373 | 8,003 | 4,361 | 3,642 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Protocol.ROC.PointTypes.PointType7 where
import Data.ByteString (ByteString)
import Data.Binary.Get (getByteString,
getWord8,
getWord16le,
Get)
import Data.Word (Word8,Word16)
impo... | plow-technologies/roc-translator | src/Protocol/ROC/PointTypes/PointType7.hs | bsd-3-clause | 10,923 | 0 | 9 | 4,252 | 1,356 | 750 | 606 | 295 | 1 |
module TwoBufferQueue where
import Control.Monad.State.Strict
import Data.Maybe( isNothing )
import Interface( MsgSourceType(..) )
type MsgParams = ()
type MsgSource a = TBQ a
data TBQ a = TBQ {
_in :: Maybe a,
_out :: Maybe a
} deriving (Show, Eq)
instance Functor TBQ where
f... | ownclo/alohas | src/TwoBufferQueue.hs | bsd-3-clause | 1,167 | 0 | 9 | 258 | 462 | 239 | 223 | 34 | 1 |
{-# LANGUAGE RankNTypes, OverloadedStrings #-}
module Protocol.ROC.ROCConfig where
import System.Hardware.Serialport
import Data.Word
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LB
import Protocol.ROC.PointTypes
type StrictByteString = BS.ByteString
type LazyByteString = LB.ByteStr... | plow-technologies/roc-translator | src/Protocol/ROC/ROCConfig.hs | bsd-3-clause | 2,036 | 0 | 14 | 1,093 | 264 | 168 | 96 | 29 | 0 |
module MaybeHero.Utils (
reverseAndExpandTuple
, lowerCaseWords
, maybeToEither
, headMaybe
, firstValue
) where
import qualified Data.Map as Map
import qualified Data.Char as C
import qualified Data.Maybe as Maybe
import qualified Data.Either as Either
expandSynonyms :: Ord b => [(a, [b])] -> [(b, a)]
expandSynony... | gtrogers/maybe-hero | src/MaybeHero/Utils.hs | bsd-3-clause | 940 | 0 | 9 | 164 | 377 | 209 | 168 | 27 | 2 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module Main where
import Wyas.Parser
import Wyas.Evaluator
import Wyas.Types
import Wyas.Error
import Test.Tasty
import Test.Tasty.HUnit
import Data.Ratio ((%))
import Data.Complex (Complex((:+)))
import Data.Vector (fromList)
testTypeParsing = testGroup "type parsi... | grtlr/wyas | test/MainTestSuite.hs | bsd-3-clause | 6,105 | 0 | 17 | 2,008 | 1,566 | 773 | 793 | 159 | 1 |
{-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Texturing.TexParameter
-- Copyright : (c) Sven Panne 2002-2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability ... | hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GL/Texturing/TexParameter.hs | bsd-3-clause | 4,919 | 0 | 14 | 841 | 1,044 | 556 | 488 | 97 | 21 |
-- head {{{
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Eval.Types where
-- }}}
-- import {{{
import qualified Data.Map as Map
-------------
import Prelude(($), (.), (+), String, Bool(..), Int, Either(..), Integer, IO,)
import Data.Maybe (maybe,)
import Data.List (concatMap, (++), repeat, take,)
import Text.Sho... | wuxb45/eval | Eval/Types.hs | bsd-3-clause | 5,242 | 0 | 19 | 1,275 | 1,884 | 1,002 | 882 | 131 | 2 |
module PlayFair where
import Data.Char
import Data.List
import Data.List.HT
import Data.List.Split
import qualified Data.Map as M
type Key = M.Map (Int, Int) Char
process :: String -> String
process = replace "J" "I" . map toUpper . filter isLetter
key :: String -> Key
key = M.fromList . concat .
zipWith (... | abhinav-mehta/CipherSolver | src/PlayFair.hs | bsd-3-clause | 1,471 | 0 | 17 | 402 | 715 | 379 | 336 | 32 | 1 |
module Network.API.Builder.Routes
( Route(..)
, URLPiece
, URLParam
, (=.)
, routeURL ) where
import Control.Arrow ((***))
import Data.Monoid ((<>))
import Data.Text (Text)
import qualified Data.Text as T
import qualified Network.HTTP.Base as HTTP (urlEncodeVars)
import qualified Network.HTTP.Types.Method as... | eryx67/api-builder | src/Network/API/Builder/Routes.hs | bsd-3-clause | 2,013 | 0 | 11 | 438 | 391 | 239 | 152 | 31 | 3 |
{-# LANGUAGE ScopedTypeVariables, PatternGuards #-}
{-# OPTIONS -fno-warn-orphans #-}
-- | A schedule of commands that should be run at a certain time.
module HCron.Schedule
-- * Time Periods
( second, minute, hour, day
-- * When
, When (..)
, WhenModifier (..)
-- * Events
, EventName
, Event (..)
, earlies... | tbk303/hcron | HCron/Schedule.hs | bsd-3-clause | 6,084 | 78 | 16 | 1,179 | 1,240 | 679 | 561 | 116 | 5 |
{-
- Hacq (c) 2013 NEC Laboratories America, Inc. All rights reserved.
-
- This file is part of Hacq.
- Hacq is distributed under the 3-clause BSD license.
- See the LICENSE file for more details.
-}
{-# LANGUAGE FlexibleContexts #-}
module Control.Monad.Quantum.CircuitBuilder (
CircuitBuilder, runCircuitB... | ti1024/hacq | src/Control/Monad/Quantum/CircuitBuilder.hs | bsd-3-clause | 1,899 | 0 | 11 | 256 | 443 | 241 | 202 | 26 | 1 |
-- Copyright : (C) 2009 Corey O'Connor
-- License : BSD-style (see the file LICENSE)
module Bind.Marshal.SerAction ( module Bind.Marshal.SerAction.Dynamic
, module Bind.Marshal.SerAction.Static
, module Bind.Marshal.SerAction.Storable
... | coreyoconnor/bind-marshal | src/Bind/Marshal/SerAction.hs | bsd-3-clause | 492 | 0 | 5 | 143 | 62 | 45 | 17 | 7 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ExplicitForAll #-}
module Main where
import Control.Monad
import Data.Typeable
import Control.Concurrent (forkIO)
import Reflex.Dom
import Reflex.Dom.Class
import Control.Monad.... | sleexyz/typegrams | client/Main.hs | bsd-3-clause | 1,622 | 0 | 13 | 468 | 575 | 281 | 294 | 43 | 2 |
--
-- HTTP client for use with io-streams
--
-- Copyright © 2012-2013 Operational Dynamics Consulting, Pty Ltd
--
-- The code in this file, and the program it is a part of, is made
-- available to you by its authors as open source software: you can
-- redistribute it and/or modify it under a BSD licence.
--
{-# LANGUA... | afcowie/pipes-http | tests/BasicSnippet.hs | bsd-3-clause | 1,090 | 0 | 11 | 189 | 173 | 102 | 71 | 20 | 1 |
--
-- Chapter 10.
--
module C'10 where
import Test.QuickCheck
import E'10'37
import E'10'36
import E'10'35
import E'10'34
import E'10'33
import E'10'32
import E'10'31
import E'10'30
import E'10'29
import E'10'28
import E'10'27
import E'10'26
import E'10'25
import E'10'24
import E'10'23
import E'10'22
import E'10... | pascal-knodel/haskell-craft | _/links/C'10.hs | mit | 623 | 0 | 4 | 90 | 123 | 83 | 40 | 39 | 0 |
{-
emacs2nix - Generate Nix expressions for Emacs packages
Copyright (C) 2016 Thomas Tuegel
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any l... | mdorman/emacs2nix | src/Distribution/Nix/Builtin.hs | gpl-3.0 | 3,033 | 0 | 9 | 1,382 | 349 | 220 | 129 | 84 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.Support.Waiters
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : Mozilla Public License,... | fmapfmapfmap/amazonka | amazonka-support/gen/Network/AWS/Support/Waiters.hs | mpl-2.0 | 624 | 0 | 4 | 122 | 39 | 31 | 8 | 7 | 0 |
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.DynamoDB
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : B... | fmapfmapfmap/amazonka | amazonka-dynamodb/gen/Network/AWS/DynamoDB.hs | mpl-2.0 | 15,383 | 0 | 5 | 3,234 | 983 | 740 | 243 | 203 | 0 |
module Data.TypedGraph.Subgraph (subgraphs, inducedSubgraphs) where
import qualified Data.Graphs as G
import qualified Data.Graphs.Morphism as GM
import Data.TypedGraph
import Data.TypedGraph.Morphism as TGM hiding (createEdgeOnDomain, createNodeOnDomain)
-- | Generates all subgraphs of a typed gr... | Verites/verigraph | src/library/Data/TypedGraph/Subgraph.hs | apache-2.0 | 1,986 | 0 | 11 | 443 | 639 | 345 | 294 | 33 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
module Main (main) where
import Criterion.Main
import Prelude ()
import Prelude.Compat
import Data.Foldable (toList)
import qualified "aeson" Data.Aeson as A
import qualified "aeson-benchmarks" Data.Aeson as B
import qualified Data.Sequence as S
imp... | tolysz/prepare-ghcjs | spec-lts8/aeson/benchmarks/AesonFoldable.hs | bsd-3-clause | 3,288 | 0 | 12 | 841 | 764 | 405 | 359 | 75 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Sandbox.Timestamp
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- Timestamp file handling (for add-source dependencies).
---------------------------------------------------... | tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/Sandbox/Timestamp.hs | bsd-3-clause | 12,082 | 0 | 27 | 3,309 | 2,131 | 1,138 | 993 | 180 | 5 |
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Futhark.Representation.AST.Syntax.CoreTests
( tests )
where
import Control.Applicative
import Test.HUnit hiding (Test)
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.QuickCheck
import Prelude
impor... | CulpaBS/wbBach | tests/Futhark/Representation/AST/Syntax/CoreTests.hs | bsd-3-clause | 2,228 | 0 | 17 | 507 | 693 | 373 | 320 | 53 | 1 |
module C where
name :: String
name = "Samantha"
| sdiehl/ghc | testsuite/tests/driver/T16511/C.hs | bsd-3-clause | 49 | 0 | 4 | 10 | 14 | 9 | 5 | 3 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
module IHaskell.Display.Widgets.String.Text (
-- * The Text Widget
TextWidget,
-- * Constructor
mkTextWidget) where
-- To keep `cabal repl` happy when running... | artuuge/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/Text.hs | mit | 2,290 | 0 | 18 | 596 | 495 | 261 | 234 | 48 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
-- #1781
-- This one should really succeed, because 'plus' can only
-- be called with a = Int->Int, but the old fundep story
-- certainly made it fail, and so that's what we expect for now
-- We may beco... | sdiehl/ghc | testsuite/tests/typecheck/should_compile/FD1.hs | bsd-3-clause | 473 | 0 | 8 | 95 | 81 | 48 | 33 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Doc.Configuring
-- Copyright : (C) 2007 Don Stewart and Andrea Rossato
-- License : BSD3
--
-- Maintainer : andrea.rossato@unibz.it
-- Stability : unstable
-- Portability : portable
--
-- This is a ... | pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Doc/Configuring.hs | bsd-2-clause | 5,387 | 0 | 3 | 963 | 44 | 41 | 3 | 2 | 0 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Traversable
-- Copyright : Conor McBride and Ross Paterson 2005
-- License : BSD-style (see the LICENSE file in the distribution)
--
-- Maint... | beni55/haste-compiler | libraries/ghc-7.10/base/Data/Traversable.hs | bsd-3-clause | 9,748 | 0 | 12 | 2,170 | 1,811 | 1,025 | 786 | 95 | 1 |
--------------------------------------------------------------------------------
-- (c) Tsitsimpis Ilias, 2011-2012
--
-- A description of the platform we're compiling for
-- Used by the native code generator
--
--------------------------------------------------------------------------------
module Platform (
Plat... | iliastsi/gac | src/codeGen/Platform.hs | mit | 1,173 | 0 | 8 | 251 | 149 | 92 | 57 | 22 | 1 |
module Modules.CapsQuotes (initializeCapsQuotes) where
import Text.Parsers.IRC
import Network.IRC.SevenInch
import Network.Socket
import Network.BSD
import Text.Regex.Posix
import System.IO
import Control.Concurrent.STM
import Control.Concurrent.STM.TChan (TChan)
import System.Random
--PubMsg Command IrcUser Channel ... | bigs/7inch | src/Modules/CapsQuotes.hs | mit | 1,140 | 0 | 14 | 185 | 365 | 192 | 173 | 29 | 2 |
{-# LANGUAGE GADTs #-}
module Dama.Parser.AST
( Program
, Decl(PDecl, FDecl)
, ExprR(ExprRVar, ExprRC)
, ExprRC(ExprRCons, AppR, ChainR)
, Expr(ExprIdent, App, Chain, LeftSection, RightSection)
, Ident(Ident)
, AltList((:+), (:+:))
) where
import Dama.Location
type Program = [Decl]
d... | tysonzero/dama | src/Dama/Parser/AST.hs | mit | 1,241 | 0 | 11 | 339 | 468 | 276 | 192 | 54 | 0 |
module Parse (parseFile) where
import Control.Monad (liftM)
import Text.Parsec
import Text.Parsec.String
import Types
source :: Parser Src
source = (string "in" >> return SrcIn)
<|> (string "null" >> return SrcNull)
<|> (string "a" >> return SrcA)
... | purcell/vm5294 | src/Parse.hs | mit | 2,050 | 0 | 22 | 576 | 749 | 368 | 381 | 45 | 2 |
-- -------------------------------------------------------------------------------------
-- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved.
-- For email, run on linux (perl v5.8.5):
-- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0... | cbrghostrider/Hacking | HackerRank/Algorithms/Greedy/jimAndTheOrders.hs | mit | 785 | 0 | 19 | 147 | 220 | 117 | 103 | 10 | 1 |
{-# LANGUAGE QuasiQuotes, TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
module Yesod.Auth.Token
( -- * Plugin
authToken
, YesodAuthToken (..)
, TokenCreds (..)
-- * Routes
, loginR
-- * Types
, Token
-- * Others
, tokenCreds
) w... | axel-angel/yesod-auth-token | src/Yesod/Auth/Token.hs | mit | 2,324 | 0 | 12 | 630 | 517 | 283 | 234 | 52 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
module Nauva.NJS
( FID(..), unFID
, createF
, F(..)
, FE
, FRA, FRD
, Value(..)
) where
import Data.Function
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as A
import Da... | wereHamster/nauva | pkg/hs/nauva/src/Nauva/NJS.hs | mit | 3,651 | 0 | 13 | 908 | 719 | 418 | 301 | 72 | 1 |
-- Directions Reduction
-- http://www.codewars.com/kata/550f22f4d758534c1100025a/
module Codewars.Kata.Reduction where
import Codewars.Kata.Reduction.Direction
-- data Direction = North | East | West | South deriving (Eq)
dirReduce :: [Direction] -> [Direction]
dirReduce = foldr reduce []
where reduce North (Sou... | gafiatulin/codewars | src/5 kyu/Reduction.hs | mit | 474 | 0 | 9 | 106 | 128 | 72 | 56 | 9 | 5 |
{-# LANGUAGE DoAndIfThenElse #-}
module Python where
import System.Directory
import System.FilePath
import System.FilePath.Find
import System.IO
import Functions
-- initiate a haskell project
ideInitPython :: IDEState -> IO (IDEState)
ideInitPython state = do
exists <- projectExists
if exists then do
... | jonathanmcelroy/commandLineIDE | Python.hs | mit | 1,341 | 0 | 20 | 281 | 259 | 133 | 126 | 28 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}
module Unison.CommandLine.InputPatterns where
import Unison.Prelude
import qualified Control.Lens.Cons as Cons
import Data.Bifunctor (first)
import Data.List (intercalate, isPrefixOf)
import Data.List.Extra... | unisonweb/platform | parser-typechecker/src/Unison/CommandLine/InputPatterns.hs | mit | 54,074 | 0 | 24 | 12,792 | 13,394 | 6,980 | 6,414 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
import qualified PersistentTest
import qualified RenameTest
import qualified DataTypeTest
import qualified EmptyEntityTest
import qualified HtmlTest
import qualified EmbedTest
import qualified EmbedOrderTest
import qualified LargeNumberTest
import qualified Max... | mkscrg/persistent | persistent-test/test/main.hs | mit | 2,399 | 0 | 13 | 401 | 435 | 247 | 188 | 76 | 1 |
{-# LANGUAGE RecordWildCards #-}
module BillboardTechnique (
BillboardTechnique (..)
, initBillboardTechnique
, setBillboardTechniqueVP
, setBillboardTechniqueColorUnit
, setBillboardCameraPosition
, enableBillboardTechnique
) where
import Graphics.GLUtil
import Graphics.Rendering.Ope... | triplepointfive/hogldev | tutorial27/BillboardTechnique.hs | mit | 1,900 | 0 | 9 | 353 | 391 | 202 | 189 | 52 | 1 |
-- | A concrete monad transformer that is an instance of
-- 'Centrinel.Control.Monad.Class.RegionResult'
{-# language GeneralizedNewtypeDeriving #-}
module Centrinel.Control.Monad.InferenceResult (
InferenceResultT (..)
, runInferenceResultT
) where
import Control.Monad.Reader (runReaderT, ReaderT, asks)
import... | lambdageek/use-c | src/Centrinel/Control/Monad/InferenceResult.hs | mit | 2,414 | 0 | 13 | 343 | 647 | 359 | 288 | 41 | 1 |
{-# language QuasiQuotes #-}
module Physics.Orbit.Metrology where
import Data.Metrology
import Data.Metrology.TH
import Data.Units.SI.Parser
declareDimension "PlaneAngleHyperbolic"
declareCanonicalUnit "RadianHyperbolic" [t| PlaneAngleHyperbolic |] (Just "rdh")
type instance DefaultUnit... | expipiplus1/orbit | src/Physics/Orbit/Metrology.hs | mit | 874 | 0 | 7 | 173 | 170 | 111 | 59 | -1 | -1 |
-- test with genpath.hs
-- base on code for chapter10 (learn_chapter10.hs)
import Data.List
main = do
contents <- getContents
let threes = groupsOf 3 (map read $ lines contents)
roadSystem = map (\[a,b,c] -> Section a b c) threes
path = optimalPath roadSystem
pathString = concat $ map (... | feliposz/learning-stuff | haskell/heathrow.hs | mit | 1,699 | 0 | 13 | 506 | 633 | 342 | 291 | 39 | 3 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SVGExternalResourcesRequired
(js_getExternalResourcesRequired, getExternalResourcesRequired,
SVGExternalResourcesRequired, castToSVGExternalResourcesRequired,
gTypeSVGExternalResourcesRequir... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/SVGExternalResourcesRequired.hs | mit | 1,791 | 6 | 11 | 265 | 377 | 238 | 139 | 30 | 1 |
-- Copyright 2016 Peter Beard
-- Distributed under the GNU GPL v2. For full terms, see the LICENSE file.
-- Find the sum of all the multiples of 3 or 5 below 1000.
main = putStrLn $ "To run the solution to a specific problem, run 'cabal run problem-xxx'"
| PeterBeard/project-euler | haskell/src/main.hs | gpl-2.0 | 256 | 0 | 5 | 50 | 13 | 8 | 5 | 1 | 1 |
-- A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of
-- the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call
-- it lexicographic order. The lexicographic permutations of 0, 1 and 2 are:
-- 012 021 102 120 20... | ciderpunx/project_euler_in_haskell | euler024.hs | gpl-2.0 | 1,160 | 0 | 9 | 259 | 290 | 156 | 134 | 19 | 1 |
{-
Code Generation
This file is part of AEx.
Copyright (C) 2016 Jeffrey Sharp
AEx is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License,
or (at your opti... | sharpjs/haskell-learning | src/Aex/CodeGen.hs | gpl-3.0 | 860 | 0 | 8 | 219 | 29 | 19 | 10 | 4 | 0 |
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
import XMonad.Layout.NoBorders
import XMonad.Layout.Grid
import XMonad.Layout.Tabbed
import XMonad.Layout.ThreeColumns
import XMonad.Layout.PerWorks... | borjatarraso/LIPT | legacyconf/xmonad/xmonad.hs | gpl-3.0 | 6,789 | 0 | 15 | 2,104 | 1,486 | 859 | 627 | 152 | 1 |
-- Types module.
-- By Gregory W. Schwartz
--
{- | Collects all application specific types. Used here for Text.
-}
{-# LANGUAGE OverloadedStrings #-}
module Data.Fasta.ByteString.Types where
-- Built-in
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as M
-- Algebraic
data FastaSequence = Fast... | GregorySchwartz/fasta | src/Data/Fasta/ByteString/Types.hs | gpl-3.0 | 1,193 | 0 | 9 | 454 | 194 | 122 | 72 | 19 | 0 |
module TweetParsers where
import Data.Aeson.Types
import Data.Time.Format (readTime, parseTime)
import Control.Applicative
import Data.Time.LocalTime (LocalTime)
import Control.Monad
import Data.Text
import System.Locale (defaul... | mkawalec/twitterbot | src/TweetParsers.hs | gpl-3.0 | 2,196 | 0 | 17 | 1,031 | 449 | 247 | 202 | 52 | 0 |
{- Trabalho 2
Resp.: Rodrigo Ferreira Guimarães
Disc.: Linguaguem de Programação
Orie.: Rodrigo Bonifácio
Func.: Expansão da linguaguem F4LAE, que já implementa
avaliação outermost, para comportar a Lazy
Evaluation de forma completa, ou seja, com a
estratégia de compartilhamento.... | rodrigofegui/UnB | 2017.2/Linguagens de Programação/Trab 2_Ver 2/F6LAE.hs | gpl-3.0 | 15,534 | 0 | 16 | 6,012 | 4,264 | 2,300 | 1,964 | 265 | 12 |
-- | Representations of mathematical 2D shapes.
module Graphics.Forensics.Shape
( -- * Shape
Shape(..)
, rectangle
, circle
-- * Paths
, PathCommand(..)
, pathVectors
, allPathVectors
-- * Properties
, area
, bounds
, center
... | Purview/purview | src/Graphics/Forensics/Shape.hs | gpl-3.0 | 2,991 | 0 | 13 | 848 | 774 | 420 | 354 | 68 | 1 |
-- (C) Copyright Chris Banks 2011-2012
-- This file is part of The Continuous Pi-calculus Workbench (CPiWB).
-- CPiWB is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the Li... | chrisbanks/cpiwb | CPi/Plot.hs | gpl-3.0 | 6,642 | 0 | 23 | 1,709 | 2,225 | 1,158 | 1,067 | 104 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
data MyRecord
= forall a b
. ( Loooooooooooooooooooooooooooooooong a
, Loooooooooooooooooooooooooooooooong b
) =>
MyConstructor
{ foo, foo2
:: loooooooooooooooooooooooooooooooong
-> loooooooooooooooooooooooooooooooong
, bar :: a
... | lspitzner/brittany | data/Test56.hs | agpl-3.0 | 357 | 0 | 9 | 101 | 59 | 36 | 23 | -1 | -1 |
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
func :: asd -> Either a b
| lspitzner/brittany | data/Test371.hs | agpl-3.0 | 140 | 0 | 6 | 18 | 16 | 8 | 8 | 1 | 0 |
-- ReaderT instances
--instance MonadTrans (ReaderT r) where
-- lift :: m a -> ReaderT r m a
-- lift = ReaderT . const
| dmp1ce/Haskell-Programming-Exercises | Chapter 26/ReaderT Instances.hs | unlicense | 121 | 0 | 2 | 26 | 6 | 5 | 1 | 1 | 0 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Lib where
import Dhall
data User = User
{ homeDirectory :: Text
, privateKeyFile :: Text
, publicKeyFile :: Text
} deriving (Eq, Generic, Show)
instance Interpret User
dmain :: IO ()
dmain = do
x <- input auto "./config/top.dha... | haroldcarr/learn-haskell-coq-ml-etc | haskell/playpen/dhall/src/Lib.hs | unlicense | 478 | 0 | 9 | 95 | 101 | 57 | 44 | 14 | 1 |
-- Slides for the Continuation Tutorial
-- September 23, 2011 -- Toukyou, Japan.
module ContTutorial where
-- * Continuations are effects, and so we have to use monads
-- * The familiar Cont monad from the Monad transformer library
-- It is actually the monad of delimited control, as we shall see
import Control.Mona... | jmgimeno/haskell-playground | src/Continuations/ContTutorial.hs | unlicense | 8,980 | 18 | 27 | 2,138 | 2,444 | 1,314 | 1,130 | -1 | -1 |
module Gigasecond where
-- http://exercism.io/exercises/haskell/gigasecond
-- original question:
-- One billion seconds... Find out the exact second you were born (if you can).
-- Figure out when you will turn (or perhaps when you did turn?) one billion seconds old. Then go mark your calendar.
-- http://two-wrongs.com/... | prt2121/haskell-practice | exercism/gigasecond/Gigasecond.hs | apache-2.0 | 459 | 0 | 6 | 63 | 38 | 25 | 13 | 4 | 1 |
module Main where
import Test.Framework (defaultMain, testGroup)
import Test.Framework.Providers.QuickCheck2
main :: IO ()
main = defaultMain tests
qsort :: Ord a => [a] -> [a]
qsort [] = []
qsort (x:xs) = qsort lhs ++ [x] ++ qsort rhs
where lhs = filter (< x) xs
... | songpp/my-haskell-playground | tests/Tests.hs | apache-2.0 | 569 | 0 | 11 | 169 | 215 | 116 | 99 | 15 | 1 |
module Valuation where
import Data.List
import Data.Maybe
{-
Project: Disjunctive Frame Unifier
Simon Pauw, 2013
-}
{-
Explanation
1) Basic concepts
Formal definitions
The unfication mechanisms deals with two types of unifications:
Assignments: var x has value a (x,a)
Constraints: var x and var y refer to the sam... | simonpauw/pcg | system/Valuation.hs | apache-2.0 | 16,520 | 11 | 19 | 2,705 | 3,058 | 1,633 | 1,425 | 189 | 3 |
{-|
A description of the operations that can be performed on
nodes and columns.
-}
module Spark.Core.Internal.OpStructures where
import Data.Text as T
import Data.Aeson(Value, Value(Null), FromJSON, ToJSON, toJSON)
import Data.Aeson.Types(typeMismatch)
import qualified Data.Aeson as A
import Data.Vector(Vector)
impor... | krapsh/kraps-haskell | src/Spark/Core/Internal/OpStructures.hs | apache-2.0 | 9,819 | 0 | 10 | 1,847 | 1,103 | 637 | 466 | 213 | 1 |
-- http://www.codewars.com/kata/53dc54212259ed3d4f00071c
module Sum where
import Prelude hiding (sum)
sum :: Num a => [a] -> a
sum = foldl (+) 0 | Bodigrim/katas | src/haskell/8-Sum-Arrays.hs | bsd-2-clause | 145 | 0 | 7 | 22 | 45 | 27 | 18 | 4 | 1 |
import Test.Framework (defaultMainWithArgs)
import Tests.Parse
main :: IO ()
main = defaultMainWithArgs [ parseTests
] ["--color"]
| binarybana/grn-pathways | tests/tests.hs | bsd-2-clause | 158 | 0 | 6 | 43 | 42 | 23 | 19 | 5 | 1 |
{-# LANGUAGE CPP, NamedFieldPuns, NondecreasingIndentation, BangPatterns, MultiWayIf #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
-----------------------------------------------------------------------------
--
-- GHC Driver
--
-- (c) The University of Glasgow 2005
--
-----------------------------------------... | sdiehl/ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | 104,582 | 6 | 31 | 34,244 | 16,357 | 8,316 | 8,041 | -1 | -1 |
module Control.Monoid where
import Control.Semigroup
class Semigroup s => Monoid s where
identity ::
s
| tonymorris/lens-proposal | src/Control/Monoid.hs | bsd-3-clause | 111 | 0 | 6 | 23 | 32 | 17 | 15 | 5 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
module KAT_Ed25519 ( tests ) where
import Crypto.Error
import qualified Crypto.PubKey.Ed25519 as Ed25519
import Imports
data Vec = Vec
{ vecSec :: ByteString
, vecPub :: ByteString
, vecMsg :: ByteString
, vecSig :: B... | nomeata/cryptonite | tests/KAT_Ed25519.hs | bsd-3-clause | 1,502 | 0 | 11 | 255 | 297 | 164 | 133 | 28 | 1 |
{-# LANGUAGE RankNTypes, ScopedTypeVariables, GADTs #-}
import Text.PrettyPrint.HughesPJClass
import System.IO.Unsafe
import Control.Monad
import Control.Monad.State
type UniqM = State [Int]
uniqSupply :: [Int]
uniqSupply = [0..]
runUniq :: UniqM a -> a
runUniq = flip evalState uniqSupply
unique :: UniqM Int
uni... | batterseapower/haskell-kata | IdiomNormalisation.hs | bsd-3-clause | 7,065 | 0 | 24 | 2,146 | 1,390 | 763 | 627 | 60 | 3 |
module FreeDSL.BFS.VTraversal (
VTraverseDslCmds(..)
, VTraversal
, VObservation(..)
-- low level API
, rootAt
, nextObservation
, currentObservation
, annotateAt
, getAnnotationAt
, getWithDefault
, modifyAnnotationAt
-- easy API
, startWithAnnotation
, rootWithAnnotation
, nextVertex
,... | rpeszek/GraphPlay | src/FreeDSL/BFS/VTraversal.hs | bsd-3-clause | 4,080 | 0 | 14 | 1,409 | 1,260 | 673 | 587 | -1 | -1 |
{-# LANGUAGE FlexibleInstances, TypeFamilies #-}
{-# LANGUAGE QuasiQuotes #-}
module Language.Pylon.Codegen.JS (mkProgram) where
-------------------------------------------------------------------------------
import Prelude hiding (mapM_)
import Language.Pylon.Codegen.Monad
import Language.Pylon.STG.AS... | zrho/pylon | src/Language/Pylon/Codegen/JS.hs | bsd-3-clause | 7,430 | 0 | 23 | 1,420 | 1,786 | 971 | 815 | 145 | 1 |
{-# LANGUAGE CPP #-}
-- #define DEBUG
{-# LANGUAGE PartialTypeSignatures #-}
{-# OPTIONS_GHC -Wno-partial-type-signatures #-}
{-|
Module : AERN2.RealFun.SineCosine
Description : Pointwise sine and cosine for functions
Copyright : (c) Michal Konecny
License : BSD3
Maintainer : mikko... | michalkonecny/aern2 | aern2-fun/src/AERN2/RealFun/SineCosine.hs | bsd-3-clause | 12,260 | 0 | 23 | 3,635 | 2,530 | 1,334 | 1,196 | -1 | -1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Text.Authoring.State where
import Control.Lens ((.~),(&),(^.))
import Control.Len... | nushio3/authoring | old-src/Text/Authoring/State.hs | bsd-3-clause | 3,233 | 0 | 16 | 777 | 841 | 464 | 377 | 79 | 1 |
{-# LANGUAGE OverloadedStrings, CPP #-}
module ListEdit ( wlistEd) where
import Text.Blaze.Html5 as El
import Text.Blaze.Html5.Attributes as At hiding (step)
import Data.String
-- #define ALONE
#ifdef ALONE
import MFlow.Wai.Blaze.Html.All
main= runNavigation "" $ transientNav wlistEd
#else
import MFlow.Wai.Blaze.Html.... | agocorona/MFlow | Demos/ListEdit.hs | bsd-3-clause | 1,120 | 0 | 14 | 332 | 248 | 133 | 115 | 23 | 1 |
{-# LANGUAGE PatternSynonyms #-}
module Main (main) where
import Data.Matrix
import System.Environment
import System.FilePath.Posix (splitExtension)
import Data.Matrix.Matlab
pattern Extension = ".qx"
main :: IO ()
main = do
args <- getArgs
case args of
[fileName]
| (_, Extension) <- splitExtension... | ku-fpg/ecc-ldpc | utilities/ExpMatrix/Main.hs | bsd-3-clause | 632 | 0 | 18 | 157 | 190 | 96 | 94 | 19 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
module Protocol.ROC.PointTypes.PointType86 where
import Data.Binary.Get (getWord8,Get)
import Data.Word (Word8)
import Prelude (($),
return,
Eq,
Read,
S... | plow-technologies/roc-translator | src/Protocol/ROC/PointTypes/PointType86.hs | bsd-3-clause | 42,432 | 0 | 9 | 14,603 | 4,855 | 2,691 | 2,164 | 1,045 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, DeriveFunctor,
DeriveDataTypeable, TypeSynonymInstances, PatternGuards #-}
module Idris.AbsSyntaxTree where
import Idris.Core.TT
import Idris.Core.Evaluate
import Idris.Core.Elaborate hiding (Tactic(..))
import Idris.Core.Typecheck
import Idris.Docst... | uwap/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | 96,181 | 0 | 22 | 30,973 | 32,028 | 16,571 | 15,457 | 1,715 | 94 |
{-# LANGUAGE BangPatterns, OverloadedStrings #-}
module Network.HPACK.Table.Entry (
-- * Type
Size
, Entry
, Header -- re-exporting
, HeaderName -- re-exporting
, HeaderValue -- re-exporting
, Index -- re-exporting
-- * Header and Entry
, toEntry
, fromEntry
-- * Getters
, entrySi... | bergmark/http2 | Network/HPACK/Table/Entry.hs | bsd-3-clause | 1,946 | 0 | 8 | 356 | 348 | 216 | 132 | 43 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module HandleRequestTests where
import qualified Data.HashMap.Strict as HashMap
import Test.Tasty
import Test.Tasty.HUnit
import Webcrank
import TestServerAPI
handleRequestTests :: TestTree
handleRequestTests = testGroup "handleRequest"
[ getTest
, postTest
, putTest
, del... | webcrank/webcrank.hs | test/HandleRequestTests.hs | bsd-3-clause | 2,878 | 0 | 16 | 631 | 773 | 421 | 352 | -1 | -1 |
{-# LANGUAGE GADTs, KindSignatures #-}
module Combinatorics.Symbolic.AllowablConstructions where
import Combinatorics.Symbolic.MathExpr
import Data.Set hiding (map)
data Class a where
Nuetral :: Class a
Atomic :: Set a -> Class a
DisUnion :: Class a -> Class a -> Class a
Cart :: Class a ->... | jfischoff/symbolic-combinatorics | src/Combinatorics/Symbolic/AllowableConstructions.hs | bsd-3-clause | 3,646 | 0 | 14 | 842 | 948 | 493 | 455 | 45 | 1 |
-- |
-- Module : Data.MultextEastMsd
-- Copyright : (c) 2009 Jan Snajder
-- License : BSD-3 (see the LICENSE file)
--
-- Maintainer : Jan Snajder <jan.snajder@fer.hr>
-- Stability : experimental
-- Portability : portable
--
-- Implementation of the MULTEXT-East morphosyntactic descriptions.
--
-- MU... | jsnajder/multext-east-msd | src/Data/MultextEastMsd.hs | bsd-3-clause | 14,654 | 0 | 12 | 3,581 | 5,015 | 2,662 | 2,353 | 342 | 2 |
module TestImport
( module TestImport
, module Export
) where
import ClassyPrelude as Export
import Test.Hspec as Export
--runDB :: SqlPersistM a -> YesodExample App a
--runDB query = do
-- pool <- fmap appConnPool getTestYesod
-- liftIO $ runSqlPersistMPool query pool
--withApp... | lambdacms/lambdacms | lambdacms-core/test/TestImport.hs | mit | 528 | 0 | 4 | 135 | 37 | 30 | 7 | 5 | 0 |
module Lamdu.Editor.Fonts
( makeGetFonts
) where
import qualified Control.Lens as Lens
import Data.IORef
import Data.MRUMemo (memoIO)
import GUI.Momentu.Font (Font)
import GUI.Momentu.Zoom (Zoom)
import qualified GUI.Momentu.Zoom as Zoom
import Lamdu.Config.Sam... | lamdu/lamdu | src/Lamdu/Editor/Fonts.hs | gpl-3.0 | 3,144 | 0 | 17 | 892 | 734 | 408 | 326 | -1 | -1 |
{-# LANGUAGE TypeFamilies, DataKinds, PolyKinds #-}
module T6018failclosed12 where
-- This should fail because there is no way to determine a, b and k from the RHS
type family Gc (a :: k) (b :: k) = r | r -> k where
Gc a b = Int
| acowley/ghc | testsuite/tests/typecheck/should_fail/T6018failclosed12.hs | bsd-3-clause | 235 | 0 | 6 | 54 | 44 | 30 | 14 | 4 | 0 |
{-# LANGUAGE BangPatterns #-}
-----------------------------------------------------------------------------
--
-- Fast write-buffered Handles
--
-- (c) The University of Glasgow 2005-2006
--
-- This is a simple abstraction over Handles that offers very fast write
-- buffering, but without the thread safety that Handle... | rahulmutt/ghcvm | compiler/Eta/Utils/BufWrite.hs | bsd-3-clause | 3,567 | 0 | 14 | 1,057 | 1,099 | 551 | 548 | 90 | 3 |
{-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "attoparsec-iso8601/Data/Attoparsec/Time/Internal.hs" #-}
{-# LANGUAGE CPP #-}
-- |
-- Module: Data.Aeson.Internal.Time
-- Copyright: (c) 2015-2016 Bryan O'Sullivan
-- License... | phischu/fragnix | tests/packages/scotty/Data.Attoparsec.Time.Internal.hs | bsd-3-clause | 1,413 | 0 | 9 | 383 | 283 | 165 | 118 | 30 | 1 |
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
module Distribution.Client.Compat.Time
(EpochTime, getModTime, getFileAge, getCurTime)
where
import Data.Int (Int64)
import System.Directory (getModificationTime)
#if MIN_VERSION_directory(1,2,0)
import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds, posixDay... | jwiegley/ghc-release | libraries/Cabal/cabal-install/Distribution/Client/Compat/Time.hs | gpl-3.0 | 4,339 | 0 | 17 | 902 | 636 | 359 | 277 | 24 | 1 |
module FRP.Sodium.IO where
import FRP.Sodium.Context
import FRP.Sodium.Internal
import Control.Concurrent (forkIO)
-- | Execute the specified IO operation asynchronously on a separate thread, and
-- signal the output event in a new transaction upon its completion.
--
-- Caveat: Where 'switch' or 'switchE' is used, ... | kevintvh/sodium | haskell/src/FRP/Sodium/IO.hs | bsd-3-clause | 2,105 | 0 | 20 | 454 | 337 | 176 | 161 | 22 | 1 |
module Handler.Nomnichi
( getNomnichiR -- ノムニチトップ
, getCreateArticleR -- 記事投稿ページの表示
, postCreateArticleR -- 記事の投稿
, getArticleR -- 記事の表示
, postArticleR -- 記事の編集
, getEditArticleR -- 記事の編集画面の表示
, postDeleteArticleR -- 記事の削除
, postCommentR -- コメントの投稿
)
where
import Import a... | SuetakeY/nomnichi_yesod | Handler/Nomnichi.hs | bsd-2-clause | 16,266 | 0 | 20 | 4,768 | 3,928 | 1,999 | 1,929 | -1 | -1 |
module DeleteDef.Dd3 where
add5 :: (Num a) => a -> a
add5 x = x+5
add5ToAll :: (Num a) => [a] -> [a]
add5ToAll lst = map add5 lst
| RefactoringTools/HaRe | test/testdata/DeleteDef/Dd3.hs | bsd-3-clause | 132 | 0 | 7 | 31 | 73 | 40 | 33 | 5 | 1 |
module Lang where
import qualified Gap
import Types
listLanguages :: Options -> IO String
listLanguages opt = return $ convert opt Gap.supportedExtensions
| syohex/ghc-mod | Lang.hs | bsd-3-clause | 157 | 0 | 7 | 24 | 42 | 23 | 19 | 5 | 1 |
module UTF8Util where
import System.IO.Error(isUserError,ioeGetErrorString)
import UTF8
utf8 = encodeUTF8 -- . arrows
{-
-- Convert \ and -> into lambda and arrow
arrows ('-':'>':s) = '\x2192':arrows s
arrows ('\\':' ':s) = '\x03bb':' ':arrows s
arrows (c:cs) = c:arrows cs
arrows [] = []
-}
-- Smileys
happy = ['\x26... | kmate/HaRe | old/tools/base/lib/UTF8Util.hs | bsd-3-clause | 548 | 0 | 12 | 95 | 92 | 54 | 38 | 10 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.