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 #-}
module App.Roster.Types (
TeamRoster(..)
, current
, next
, addPersonToRoster
, increaseRosterIndex
, decreaseRosterIndex
, replaceInCurrent
, replaceInNext) where
import App.Roster.RosterGeneration (genera... | afcastano/cafe-duty | src/App/Roster/Types.hs | bsd-3-clause | 6,268 | 0 | 14 | 2,266 | 1,557 | 813 | 744 | 101 | 2 |
{-# LANGUAGE TemplateHaskell #-}
import Data.Angle
import Debug.Trace
import Lib
import Object
(Point(..), Vector(..), Ray(..), march, distanceFrom', Form(..))
import qualified Params
import qualified System.Random as Random
import Test.QuickCheck (quickCheck, quickCheckAll, (==>))
import qualified Test.QuickCh... | lobachevzky/pathtracer | test/Spec.hs | bsd-3-clause | 6,754 | 0 | 16 | 1,370 | 2,563 | 1,354 | 1,209 | -1 | -1 |
module Sexy.Classes.Functor (Functor(..)) where
class Functor f where
(<$>) :: (a -> b) -> f a -> f b
(<$) :: a -> f b -> f a
a <$ fb = (\_ -> a) <$> fb
| DanBurton/sexy | src/Sexy/Classes/Functor.hs | bsd-3-clause | 161 | 0 | 9 | 45 | 97 | 53 | 44 | 5 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE GADTs #-}
module GDAL.Plugin.Compiler (
CompilerConfig (..)
, Compiler
, Result (..)
, startCompilerWith
, startCompiler
, stopCompiler
, compile
--... | meteogrid/gdal-plugin-hs | src/GDAL/Plugin/Compiler.hs | bsd-3-clause | 7,293 | 0 | 24 | 2,014 | 1,988 | 1,072 | 916 | 178 | 4 |
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
module Main where
import Control.Applicative hiding (empty)
import Control.Monad.Reader
-- import Data.Generics.PlateData
import System.Console.CmdArgs
import System.Environment
import System.IO
import Text.Keepalived
main :: IO ()
main = do
n <- getPro... | maoe/kc | Kc.hs | bsd-3-clause | 4,460 | 0 | 15 | 1,330 | 996 | 507 | 489 | 84 | 2 |
module HVX.Internal.Matrix
( Mat
, allMat
, anyMat
, diagMat
, ei
, fpequalsMat
, lpnorm
, matrixPow
, reduceMat
, scalarMat
, zeroMat
, zeroVec
) where
import Numeric.LinearAlgebra
import HVX.Internal.Util
type Mat = Matrix Double
allMat :: (Double -> Bool) -> Mat -> Bool
allMat f x = all... | chrisnc/hvx | src/HVX/Internal/Matrix.hs | bsd-3-clause | 1,333 | 0 | 10 | 349 | 600 | 323 | 277 | 48 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-|
Module : Stack.Sig.Sign
Description : Signing Packages
Copyright : (c) FPComplete.com, 2015
License : BSD3
Maintainer : Tim Dysinger <tim@fpco... | martin-kolinek/stack | src/Stack/Sig/Sign.hs | bsd-3-clause | 4,811 | 0 | 22 | 1,509 | 994 | 520 | 474 | 94 | 5 |
{-# LANGUAGE OverloadedStrings #-}
import RSSBuffer
import Database.Redis -- hedis
import Network.Curl.Download -- download-curl, sudo apt-get libcurl4-openssl-dev
import Text.XML.Light -- xml
import qualified Data.List as L
import Control.Monad.IO.Class
import Data.Maybe
import Data.Monoid
import Debug.Trace
import... | mxswd/rss-buffer | job.hs | bsd-3-clause | 2,294 | 0 | 19 | 488 | 741 | 387 | 354 | 41 | 1 |
module Ghazan(
module Ghazan.Area
, module Ghazan.Length
, module Ghazan.Liquid
, module Ghazan.Numerics
, module Ghazan.Speed
, module Ghazan.Temperature
, module Ghazan.Volume
, module Ghazan.Weight
, module Ghazan.Time
) where
-- Source Imports
import Ghazan.Area
import Ghazan... | Cortlandd/ConversionFormulas | src/Ghazan.hs | bsd-3-clause | 479 | 0 | 5 | 91 | 106 | 68 | 38 | 19 | 0 |
module Main
where
import Control.Concurrent (forkIO)
import Control.Concurrent.STM
import Control.Concurrent.STM.TVar
import Control.Monad.Trans (liftIO)
import Data.Time
import System.Environment (getArgs)
import System.Process.Monitor
main = do
args <- getArgs
putStrLn "Monitoring beginning..."
time <... | stormont/vg-process-monitor | DefaultIntervalMonitor.hs | bsd-3-clause | 872 | 0 | 11 | 232 | 232 | 117 | 115 | 28 | 1 |
{-
(c) The GRASP Project, Glasgow University, 1994-1998
\section[TysWiredIn]{Wired-in knowledge about {\em non-primitive} types}
-}
{-# LANGUAGE CPP #-}
-- | This module is about types that can be defined in Haskell, but which
-- must be wired into the compiler nonetheless. C.f module TysPrim
module TysWiredIn (
... | urbanslug/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | 34,151 | 0 | 14 | 8,910 | 5,403 | 2,954 | 2,449 | 474 | 10 |
module Compile.Types.AbstractAssembly where
import Compile.Types.Ops
data AAsm = AAsm {aAssign :: [ALoc]
,aOp :: Op
,aArgs :: [AVal]
}
| ACtrl COp AVal
| AComment String deriving Show
data AVal = ALoc ALoc
| AImm Int deriving Show... | maurer/15-411-Haskell-Base-Code | src/Compile/Types/AbstractAssembly.hs | bsd-3-clause | 379 | 0 | 9 | 149 | 95 | 59 | 36 | 11 | 0 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Dimensions.AF
( allDimensions
) where
import Duckling.Dimensions.Types
allDimensions :: [Se... | facebookincubator/duckling | Duckling/Dimensions/AF.hs | bsd-3-clause | 371 | 0 | 6 | 65 | 45 | 29 | 16 | 6 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Bead.View.Content.Assignment.View where
import Prelude hiding (min)
import Control.Arrow ((&&&))
import qualified Data.Aeson as Aeson
import qualified Data.ByteString.Lazy.Char8 as BsLazy
import Data.Maybe (fromMaybe)
import Data.Monoid... | andorp/bead | src/Bead/View/Content/Assignment/View.hs | bsd-3-clause | 32,216 | 37 | 28 | 12,156 | 7,155 | 3,629 | 3,526 | 525 | 32 |
{-#LANGUAGE OverloadedStrings#-}
{-
Project name: Merge XLS files
Min Zhang
Date: Oct 13, 2015
Version: v.0.1.0
README: Merge columns from excel files.
This program aims for more general file merging situations.
However, for the time being, only merge files with exact same first column (row names), ha... | Min-/fourseq | src/utils/MergeXls.hs | bsd-3-clause | 3,324 | 0 | 15 | 612 | 618 | 336 | 282 | 53 | 2 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, DeriveFunctor #-}
{-| TT is the core language of Idris. The language has:
* Full dependent types
* A hierarchy of universes, with cumulativity: Type : Type1, Type1 : Type2, ...
* Pattern matching letrec binding
* (primitive types defined exter... | andyarvanitis/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | 54,225 | 0 | 17 | 17,184 | 20,636 | 10,367 | 10,269 | -1 | -1 |
-- | Simple but usefull functions, those match no specific module.
module Youtan.Utils where
-- | Applies a function while the condition are met.
while :: ( a -> a -> Bool ) -> ( a -> a ) -> a -> a
while con f v = let step x y = if x `con` y then step ( f x ) x else x
in step ( f v ) v
| triplepointfive/Youtan | src/Youtan/Utils.hs | bsd-3-clause | 304 | 0 | 12 | 90 | 107 | 57 | 50 | 4 | 2 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeInType #-}
modu... | isovector/category-theory | src/Functor.hs | bsd-3-clause | 2,249 | 0 | 10 | 539 | 1,010 | 535 | 475 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
This module defines interface types and binders
-}
{-# LANGUAGE CPP, FlexibleInstances, BangPatterns #-}
{-# LANGUAGE MultiWayIf #-}
-- FlexibleInstances for Binary (DefMethSpec IfaceType)
module IfaceType (
... | ezyang/ghc | compiler/iface/IfaceType.hs | bsd-3-clause | 54,462 | 2 | 17 | 15,872 | 13,307 | 6,625 | 6,682 | 997 | 32 |
module Lab3 where
-----------------------------------------------------------------------------------------------------------------------------
-- LIST COMPREHENSIONS
------------------------------------------------------------------------------------------------------------------------------
-- =====================... | javier-alvarez/myhaskell | lab3.hs | bsd-3-clause | 1,282 | 0 | 9 | 164 | 276 | 160 | 116 | 12 | 1 |
module Core.Pretty where
import Text.PrettyPrint
import Core.AST
import Core.Parser
prettyProgram :: CoreProgram -> String
prettyProgram = render . semiSep . map prettyDefn
semiSep :: [Doc] -> Doc
semiSep = vcat . punctuate semi
spaceSep :: [String] -> Doc
spaceSep = sep . map text
prettyDefn :: CoreDefn -> Doc
p... | WraithM/CoreCompiler | src/Core/Pretty.hs | bsd-3-clause | 1,463 | 0 | 10 | 302 | 637 | 318 | 319 | 36 | 2 |
-- | Addable
------------------------------------------------------------------------------
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
module Constraint.Addable where
--------------------------------------------------------... | Conflagrationator/HMath | src/Constraint/Addable.hs | bsd-3-clause | 1,356 | 0 | 10 | 209 | 264 | 145 | 119 | 14 | 0 |
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}
module Games.Melee (
Melee (..),
PlayerState (..),
) where
import Lib
import Vector
im... | jonascarpay/visor | src/Games/Melee.hs | bsd-3-clause | 5,931 | 0 | 21 | 2,120 | 2,168 | 1,101 | 1,067 | 161 | 3 |
{-# LANGUAGE OverloadedStrings #-}
-- | Module : Network.MPD.Util
-- Copyright : (c) Ben Sinclair 2005-2009, Joachim Fasting 2010
-- License : MIT (see LICENSE)
-- Maintainer : Joachim Fasting <joachim.fasting@gmail.com>
-- Stability : alpha
--
-- Utilities.
module Network.MPD.Util (
parseDate, parseIs... | beni55/libmpd-haskell | src/Network/MPD/Util.hs | mit | 4,001 | 0 | 16 | 892 | 1,056 | 582 | 474 | 61 | 2 |
module XML.GPRReader.GXLReaderSpec where
import Data.List
import Data.Matrix hiding ((<|>))
import Test.Hspec
import Abstract.Category
import Abstract.Rewriting.DPO
import Analysis.CriticalPairs
import Analysis.CriticalSequence
... | rodrigo-machado/verigraph | tests/XML/GPRReader/GXLReaderSpec.hs | gpl-3.0 | 2,663 | 0 | 13 | 515 | 753 | 392 | 361 | 54 | 1 |
module Spark.Core.ContextSpec where
import Test.Hspec
import Spark.Core.Functions
spec :: Spec
spec = do
describe "Basic routines to get something out" $ do
it "should print a node" $ do
let x = dataset ([1 ,2, 3, 4]::[Int])
x `shouldBe` x
-- b = nodeToBundle (untyped x) in
-- t... | krapsh/kraps-haskell | test/Spark/Core/ContextSpec.hs | apache-2.0 | 366 | 0 | 18 | 107 | 93 | 53 | 40 | 9 | 1 |
{-# LANGUAGE TransformListComp #-}
oldest :: [Int] -> [String]
oldest tbl = [ "str"
| n <- tbl
, then id
]
| mpickering/ghc-exactprint | tests/examples/ghc710/TransformListComp.hs | bsd-3-clause | 147 | 0 | 7 | 62 | 42 | 23 | 19 | 5 | 1 |
module Blockchain.Mining (
nonceIsValid'
) where
import Control.Monad.IO.Class
import Control.Monad.Trans.State
import qualified Data.Array.IO as A
import qualified Data.Binary as Bin
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import Data.Word
import Blockchain.Context
imp... | jamshidh/ethereum-client-haskell | src/Blockchain/Mining.hs | bsd-3-clause | 1,605 | 0 | 14 | 331 | 444 | 240 | 204 | 36 | 1 |
module Utils where
-- |
--
-- >>> split "foo bar baz"
-- ["foo","bar baz"]
-- >>> split "foo bar baz"
-- ["foo","bar baz"]
split :: String -> [String]
split xs = [ys, dropWhile isSpace zs]
where
isSpace = (== ' ')
(ys,zs) = break isSpace xs
-- |
--
-- >>> splitN 0 "foo bar baz"
-- ["foo","bar baz"]
--... | cabrera/ghc-mod | src/Utils.hs | bsd-3-clause | 581 | 0 | 11 | 158 | 162 | 91 | 71 | 10 | 1 |
module Bead.Persistence.SQL.FileSystem where
import Control.Applicative ((<$>))
import Control.DeepSeq (deepseq)
import Control.Monad
import Control.Monad.IO.Class
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BS
import ... | pgj/bead | src/Bead/Persistence/SQL/FileSystem.hs | bsd-3-clause | 8,847 | 0 | 19 | 1,922 | 2,491 | 1,255 | 1,236 | 175 | 4 |
-- | Support for basic table drawing.
module Brick.Widgets.Table
(
-- * Types
Table
, ColumnAlignment(..)
, RowAlignment(..)
, TableException(..)
-- * Construction
, table
-- * Configuration
, alignLeft
, alignRight
, alignCenter
, alignTop
, alignMiddle
, alignBottom
, setColAlignme... | sjakobi/brick | src/Brick/Widgets/Table.hs | bsd-3-clause | 8,997 | 0 | 26 | 2,601 | 1,720 | 932 | 788 | 155 | 9 |
-----------------------------------------------------------------------------
-- |
-- Module : Plugins.StdinReader
-- Copyright : (c) Andrea Rossato
-- License : BSD-style (see LICENSE)
--
-- Maintainer : Jose A. Ortega Ruiz <jao@gnu.org>
-- Stability : unstable
-- Portability : unportable
--
-- A p... | dragosboca/xmobar | src/Plugins/StdinReader.hs | bsd-3-clause | 1,286 | 0 | 14 | 225 | 232 | 132 | 100 | 22 | 1 |
{-# LANGUAGE TemplateHaskell, ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : Mezzo.Compose.Harmony
-- Description : Harmony composition units
-- Copyright : (c) Dima Szamozvancev
-- License : MIT
--
-- Maintainer : ds709@cam.ac.uk... | DimaSamoz/mezzo | src/Mezzo/Compose/Harmony.hs | mit | 5,690 | 95 | 12 | 1,100 | 1,937 | 1,012 | 925 | -1 | -1 |
module Mockups.Parsers.Element where
import Control.Applicative
import Data.Attoparsec.Char8
import Mockups.Elements.Element
import Mockups.Parsers.Common
import Mockups.Parsers.Img
import Mockups.Parsers.Txt
import Mockups.Parsers.Box
eltParser ... | ostapneko/tiny-mockups | src/main/Mockups/Parsers/Element.hs | mit | 863 | 0 | 11 | 222 | 200 | 100 | 100 | 25 | 1 |
module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Auth.OAuth2.Github (oauth2Github)
import Yesod.Default.Util (addStaticContentExternal)
import Yesod.C... | ruHaskell/ruhaskell-yesod | Foundation.hs | mit | 6,464 | 0 | 17 | 1,893 | 1,523 | 742 | 781 | -1 | -1 |
-- -------------------------------------------------------------------------------------
-- 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/Mathematics/Probability/bdayGift.hs | mit | 804 | 0 | 13 | 135 | 127 | 67 | 60 | 9 | 1 |
import Data.Char
import Data.List
digitize :: Int -> [Int]
digitize x = map digitToInt $ show x
palindrome :: Eq a => [a] -> Bool
palindrome xs = xs == (reverse xs)
numdrome :: Int -> Bool
numdrome = palindrome . digitize
list = [x |a <- [1..999], b <- [1..999], let x = a*b]
largestDrome = last $ sort $ filter nu... | johnprock/euler | p4.hs | mit | 332 | 0 | 10 | 70 | 162 | 85 | 77 | 10 | 1 |
module Main where
import Data.ByteString.Char8 as C8 (ByteString(..),readFile,unpack)
import Data.List (intercalate)
import System.Console.GetOpt (OptDescr(..),ArgDescr(..),ArgOrder(..),getOpt,usageInfo)
import System.Environment (getArgs)
import System.Exit (ExitCode(..),exitSuccess,exitWith)
import Debug.Trace... | horia141/bachelor-thesis | dev/SeqAsm/Main.hs | mit | 2,850 | 0 | 20 | 707 | 880 | 487 | 393 | 52 | 3 |
module GHCJS.DOM.CSSValueList (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/CSSValueList.hs | mit | 42 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE
PatternGuards, MultiParamTypeClasses, FunctionalDependencies,
FlexibleContexts, FlexibleInstances, TypeSynonymInstances,
UndecidableInstances, OverloadedStrings, MultiWayIf #-}
module Basic.Eval
(run, runProg, Eval(..)
)where
import Basic.Doub hiding (D)
import Basic.AST... | dmringo/pure-basic | src/Basic/Eval.hs | mit | 21,557 | 0 | 25 | 8,005 | 6,590 | 3,266 | 3,324 | -1 | -1 |
import Data.Maybe (Maybe (..))
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit hiding (path)
import Test.HUnit.Base (Assertion)
-- modules we will test
import M3U.Common ... | siddharthist/m3u-convert | test/Main.hs | mit | 1,796 | 0 | 10 | 812 | 268 | 165 | 103 | 26 | 1 |
module Handler.Home where
import Data.Maybe (fromJust)
import Import
import qualified GitHub as GH
getHomeR :: Handler Html
getHomeR = maybeAuthId >>= homeHandler
_repository :: GH.Repository -> Widget
_repository repo = $(widgetFile "_repository")
homeHandler :: Maybe UserId -> Handler Html
homeHandler Nothing =
... | jspahrsummers/ScrumBut | Handler/Home.hs | mit | 790 | 0 | 12 | 172 | 238 | 113 | 125 | -1 | -1 |
module Antiqua.Graphics.Colors(
module Antiqua.Graphics.Colors,
Color,
rgb,
dim,
mult,
mix
) where
import Antiqua.Graphics.Color
black :: Color
black = rgb 0 0 0
white :: Color
white = rgb 255 255 255
grey :: Color
grey = rgb 128 128 128
darkGrey :: Color
darkGrey = rgb 64 64 64
brown :: C... | olive/antiqua-prime | src/Antiqua/Graphics/Colors.hs | mit | 614 | 0 | 5 | 158 | 241 | 133 | 108 | 32 | 1 |
module Sing2 where
fstString :: [Char] -> [Char]
fstString x = x ++ " river"
sndString :: [Char] -> [Char]
sndString x = x ++ " than a mile"
sing = if (x > y) then fstString x
else sndString y
where x = "Moon"
y = "wider"
| Numberartificial/workflow | haskell-first-principles/haskell-from-first-principles-master/05/05.08.08-fix-it-2.hs | mit | 241 | 0 | 7 | 67 | 96 | 54 | 42 | 9 | 2 |
{-
Advent of Code: Day 1
Santa is trying to deliver presents in a large apartment building, but he can't find the right floor.
The directions he got are a little confusing. He starts on the ground floor (floor 0) and then follows the instructions
one character at a time.
An opening parenthesis, (, means he should g... | samueljackson92/advent-of-code | day1/day1.hs | mit | 2,109 | 0 | 12 | 419 | 347 | 175 | 172 | 17 | 2 |
module Control.Process(
idP,
(<.>),
next,
recursively,
module Control.Process.Show,
module Control.Process.Update,
module Control.Process.Class
) where
import Control.Process.Show
import Control.Process.Update
import Control.Process.Class
import Types.Synonyms
import Types.TextlunkyCommand
import Types... | 5outh/textlunky | src/Control/Process.hs | mit | 1,980 | 0 | 9 | 541 | 742 | 388 | 354 | 52 | 1 |
-----------------------------------------------------------------------
--
-- Haskell: The Craft of Functional Programming, 3e
-- Simon Thompson
-- (c) Addison-Wesley, 1996-2011.
--
-- PicturesSVG
--
-- The Pictures functionality implemented by translation
-- SVG (Scalable Vector Graphics)
--
-- T... | PavelClaudiuStefan/FMI | An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator2/PicturesSVG.hs | cc0-1.0 | 7,699 | 0 | 18 | 2,038 | 2,314 | 1,246 | 1,068 | 124 | 5 |
{-Main.hs-}
module Main where
--------------------------------------------------------------------------------
-- |Import
import LispVal
import LispEval
import LispConsole
import System.Environment
import Control.Monad
-- |End Import
--------------------------------------------------------------------------------
--... | pennetti/scheme-repl | src/Main.hs | gpl-2.0 | 440 | 0 | 8 | 56 | 69 | 41 | 28 | 10 | 2 |
--
-- Copyright (c) 2013-2019 Nicola Bonelli <nicola@pfq.io>
--
-- 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 2 of the License, or
-- (at your option) any later version.
--
-... | awgn/cgrep | src/CGrep/Token.hs | gpl-2.0 | 6,452 | 0 | 15 | 2,038 | 2,010 | 1,068 | 942 | 105 | 7 |
-- ProblemaDelViajante.hs
-- Problema del viajante.
-- José A. Alonso Jiménez https://jaalonso.github.com
-- =====================================================================
module Tema_24.ProblemaDelViajante where
-- ---------------------------------------------------------------------
-- Descripción del proble... | jaalonso/I1M-Cod-Temas | src/Tema_24/ProblemaDelViajante.hs | gpl-2.0 | 6,370 | 0 | 12 | 1,574 | 1,389 | 821 | 568 | 67 | 2 |
module Sound.Tidal.Params where
import Sound.Tidal.Stream
import Sound.Tidal.Pattern
import Sound.OSC.FD
import Sound.OSC.Datum
import Data.Map as Map
make' :: (a -> Datum) -> Param -> Pattern a -> OscPattern
make' toOsc par p = fmap (\x -> Map.singleton par (defaultV x)) p
where defaultV a = Just $ toOsc a
sound ... | kindohm/Tidal | Sound/Tidal/Params.hs | gpl-3.0 | 2,948 | 0 | 10 | 520 | 1,118 | 568 | 550 | 87 | 1 |
module Diamond2 where
import Diamond4
y = 2
| roberth/uu-helium | test/make/Diamond2.hs | gpl-3.0 | 46 | 0 | 4 | 10 | 12 | 8 | 4 | 3 | 1 |
{- ============================================================================
| Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> |
| |
| This file is part of Fallback. |
... | mdsteele/fallback | src/Fallback/Data/Bijection.hs | gpl-3.0 | 2,715 | 0 | 9 | 908 | 435 | 234 | 201 | 24 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Crypto.Hash (hash, MD5)
import Data.Maybe
import Data.Monoid
import qualified Data.Text as T
import Data.Text.Encoding (encodeUtf8)
import Control.Monad.IO.Class
import Control.Monad (when)
im... | Arguggi/irc-log | frontend/src/Main.hs | gpl-3.0 | 7,795 | 0 | 20 | 1,953 | 2,329 | 1,163 | 1,166 | 158 | 4 |
{-# LANGUAGE NoMonomorphismRestriction, PackageImports, TypeFamilies,
ScopedTypeVariables #-}
module HEP.Physics.TTBar.Analysis.Separate where
import HEP.Util.Functions
import HROOT
import HEP.Parser.LHCOAnalysis.PhysObj hiding (FourMomentum,fourmomfrometaphipt,trd3)
import HEP.Physics.TTBar.Error
... | wavewave/ttbar | lib/HEP/Physics/TTBar/Analysis/Separate.hs | gpl-3.0 | 2,027 | 0 | 16 | 775 | 401 | 213 | 188 | 34 | 3 |
module LP.Read where
import Data.Maybe (fromMaybe)
import Data.Map
import LP.Utils
import Stundenplan
data LPParseError v
= InvalidDouble v Double
| InexistentVar v
deriving Show
stupidParse :: LPVar a v => [a] -> Map v Double -> Either (LPParseError v) [a]
stupidParse as lpResult = parseList $ assocs lpRes... | turion/hasched | LP/Read.hs | gpl-3.0 | 1,269 | 0 | 12 | 229 | 388 | 195 | 193 | 25 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
-- | Heterogeneous lists in Haskell.
module HList where
-- | Heterogeneous lists with GADTs (and DataKinds, and TypeOperators).
--
--
data HList tys where -- `tys` denotes the types of all the elements in the list!
HNil :... | capitanbatata/apath-slfp | competent/gadts/src/HList.hs | gpl-3.0 | 2,055 | 0 | 10 | 494 | 388 | 225 | 163 | 24 | 1 |
{-# LANGUAGE PatternSynonyms #-}
{-|
Module : ANSI
Description : ANSI escape codes
Copyright : (c) Frédéric BISSON, 2014
License : GPL-3
Maintainer : zigazou@free.fr
Stability : experimental
Portability : POSIX
ANSI escape codes.
-}
module Minitel.Constants.ANSI where
import Minitel.Constants.ASCII as A... | Zigazou/HaMinitel | src/Minitel/Constants/ANSI.hs | gpl-3.0 | 4,325 | 0 | 6 | 1,057 | 747 | 416 | 331 | 73 | 0 |
module Peer.Get.Packet (messageConduit) where
import HTorrentPrelude
import Peer.Get.Exception
import Peer.Message
import Peer.Message.Get
import qualified Data.ByteString.Lazy as LBS
import Data.Conduit.Serialization.Binary
import qualified Data.Conduit.List as CL
import Control.Monad.Exception.Synchronous
messageC... | ian-mi/hTorrent | Peer/Get/Packet.hs | gpl-3.0 | 763 | 0 | 9 | 81 | 194 | 110 | 84 | 15 | 1 |
import Import
import System.IO
import System.Environment
import System.Console.GetOpt
import System.Directory
import System.Exit
import Control.Concurrent.MVar
import qualified Data.Map as Map
import Language.Octopus
import Language.Octopus.Data
import Language.Octopus.Parser
import Language.Octopus.Libraries
import ... | Zankoku-Okuno/octopus | main.hs | gpl-3.0 | 2,527 | 1 | 17 | 786 | 667 | 341 | 326 | 70 | 4 |
import System.IO
import System.FilePath
import Data.List
import Data.List.Split
days = ["first", "second", "third", "fourth", "fifth", "sixth",
"seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth"]
nums = ["a", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight",
... | jandersen7/Daily | src/296e/hs/twelve.hs | gpl-3.0 | 1,342 | 0 | 15 | 323 | 590 | 315 | 275 | 33 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.DataTransfe... | brendanhay/gogol | gogol-admin-datatransfer/gen/Network/Google/DataTransfer/Types/Product.hs | mpl-2.0 | 16,508 | 0 | 18 | 4,049 | 3,061 | 1,765 | 1,296 | 355 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/RegionHealthCheckServices/Delete.hs | mpl-2.0 | 5,362 | 0 | 17 | 1,147 | 553 | 331 | 222 | 91 | 1 |
{-# OPTIONS -fglasgow-exts -fffi #-}
module PluginEvalAux where
import System.Plugins.Make
import System.Plugins.Load
import System.Plugins.Utils
import Foreign.C
import Control.Exception ( evaluate )
import System.IO
import System.Directory ( renameFile, removeFile )
symbol = "resource"
evalWithStr... | stepcut/plugins | testsuite/objc/expression_parser/PluginEvalAux.hs | lgpl-2.1 | 1,190 | 1 | 17 | 251 | 364 | 176 | 188 | -1 | -1 |
module Main where
import Prelude as P
import System.Console.GetOpt
import System.Environment
import System.FilePath.Posix
import Control.Monad.IO.Class
import Control.Applicative
import qualified Data.ByteString as BS
import Data.Conduit.Binary as CB
import qualified Data.Conduit.List as CL
import Data.Conduit
imp... | nsmryan/BIC | hexBin.hs | unlicense | 1,923 | 0 | 16 | 482 | 569 | 309 | 260 | 51 | 3 |
squaresList n = [i ^ 2 | i <- [1..n]]
pairsList x y = [(a, b) | a <- [1..x], b <- [10..y]]
-- nested two loop
concat xss = [x | xs <- xss, x <- xs]
-- loop with guard
evens n = [x | x <- [1..n], even x]
factors n = [x | x <- [1..n], n `mod` x == 0]
prime n = factors n == [1, n]
primes n = [x | x <- [1..n], prime ... | dongarerahul/edx-haskell | chapter4.hs | apache-2.0 | 1,242 | 0 | 12 | 344 | 795 | 422 | 373 | 27 | 1 |
ans :: [Int] -> [String]
ans (x:y:xs) =
replicate x $ replicate y '#'
printRec :: [[String]] -> IO()
printRec [] = return ()
printRec (s:sx) = do
mapM_ putStrLn s
putStrLn ""
printRec sx
main = do
c <- getContents
let t = map (map read) $ map words $ lines c :: [[Int]]
i = takeWhile (/= [0,0]) t
... | a143753/AOJ | ITP1_5_A.hs | apache-2.0 | 352 | 0 | 14 | 98 | 206 | 102 | 104 | 15 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-
BoardTest.hs
Copyright (c) 2014 by Sebastien Soudan.
Apache License Version 2.0, January 2004
-}
module BoardTest where
import Board
import Data.Maybe (isNothing)
import Test.QuickCheck (Arbitrary (..))
import Test.QuickCheck.G... | ssoudan/hsChess | test/BoardTest.hs | apache-2.0 | 1,746 | 0 | 13 | 426 | 463 | 246 | 217 | 32 | 1 |
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you ma... | facebook/fbthrift | thrift/test/hs/Server.hs | apache-2.0 | 2,531 | 0 | 13 | 534 | 806 | 401 | 405 | 41 | 1 |
-- |
-- Module : Statistics.Matrix.Mutable
-- Copyright : (c) 2014 Bryan O'Sullivan
-- License : BSD3
--
-- Basic mutable matrix operations.
module Statistics.Matrix.Mutable
(
MMatrix(..)
, MVector
, replicate
, thaw
, bounds
, unsafeFreeze
, unsafeRead
, unsafeWrite
, un... | fpco/statistics | Statistics/Matrix/Mutable.hs | bsd-2-clause | 2,298 | 0 | 11 | 523 | 834 | 437 | 397 | 52 | 1 |
module Language.Ptlish.Simplify (simplify) where
import Language.Ptlish.AST
import Control.Monad.State
import qualified Data.Map as Map
import Data.Maybe
type SimplifyM = State SimplifyState
data SimplifyState = SimplifyState {
stNextExprId :: Int,
stExtra :: [(Name,Expr)],
stExprMa... | tlaitinen/ptlish | Language/Ptlish/Simplify.hs | bsd-2-clause | 4,544 | 0 | 19 | 1,359 | 1,945 | 937 | 1,008 | 135 | 3 |
{-# LANGUAGE OverloadedStrings #-}
import System.Directory
import System.Time
import System.IO
import qualified Data.List as L
import Text.ParserCombinators.Parsec
import Text.Blaze.Html5 as H
import Text.Blaze.Html5.Attributes as A
import Text.Blaze.Html.Renderer.Pretty
import qualified Text.Blaze.Internal as I
impor... | adrienhaxaire/adrienhaxaire.org | update.hs | bsd-3-clause | 12,406 | 0 | 21 | 3,596 | 3,114 | 1,515 | 1,599 | 238 | 3 |
---------------------------------------------------------------------------
-- |
-- module : Control.Monad.Trans.Cont
-- Copyright : (c) Evgeniy Permyakov 2010
-- License : BSD-style (see the LICENSE file in the distribution)
--
-- Maintainer : permeakra@gmail.com
-- Stability : experimental
-- Port... | permeakra/yamtl | Control/Monad/Trans/Invoke.hs | bsd-3-clause | 1,150 | 0 | 12 | 245 | 344 | 183 | 161 | 15 | 1 |
-- | Bookstore Example
-- example from Realworld Haskell Chapter 03
module Week02.BookStore where
data BookInfo = Book Integer String [String]
deriving (Show)
data MagazineInfo = Magazine Integer String [String]
deriving (Show)
-- Type synonyms
type CustomerID = Int
type CardHo... | emaphis/Haskell-Practice | cis194/src/Week02/BookStore.hs | bsd-3-clause | 1,484 | 0 | 8 | 422 | 334 | 196 | 138 | 38 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Pattern-matching bindings (HsBinds and MonoBinds)
Handles @HsBinds@; those at the top level require different handling,
in that the @Rec@/@NonRec@/etc structure is thrown away (whereas at
lower levels it is preserved with... | spinda/liquidhaskell | src/Language/Haskell/Liquid/Desugar710/DsBinds.hs | bsd-3-clause | 46,621 | 0 | 24 | 14,591 | 7,877 | 4,053 | 3,824 | 508 | 21 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Network.EasyBitcoin.BitcoinUnits
( btc
, mBTC
, satoshis
, asBtc
, asMbtc
, asSatoshis
, showAsBtc
, showAsMbtc
, showAsSatoshis
, BTC()
)where
import Network.EasyBitcoin.NetworkParams
import Network.EasyBitcoin.Internal.InstanciationHelpers
import Contro... | vwwv/easy-bitcoin | Network/EasyBitcoin/BitcoinUnits.hs | bsd-3-clause | 2,212 | 0 | 12 | 721 | 638 | 337 | 301 | 53 | 2 |
module Tunagui.Widget.Component.Part
(
ClickableArea (..)
, mkClickableArea
, TextContent (..)
, mkTextContent
) where
import Control.Monad (void)
import Control.Monad.IO.Class (liftIO)
import Control.Concurrent (forkIO)
import Control.Concurrent.MVar
import ... | masatoko/tunagui | src/Tunagui/Widget/Component/Part.hs | bsd-3-clause | 2,600 | 0 | 18 | 655 | 901 | 483 | 418 | 67 | 1 |
import Language.Mira.RegExpParser as Parser
import Control.Monad
import System.Environment
main = liftM head getArgs >>= print . Parser.regex . Parser.lexer | AidanDelaney/Mira | src/examples/ParserExample.hs | bsd-3-clause | 158 | 0 | 8 | 20 | 45 | 25 | 20 | 4 | 1 |
{-# LANGUAGE ViewPatterns #-}
module Lib
( someFunc
, Point
, LineSegment
, distance
, perpendicularDistance
, splitAtMaxDistance
, douglasPeucker
) where
import Data.Sequence as D
type Point = (Double,Double)
type LineSegment = (Point,Point)
distance :: Point -> Point -> D... | newmana/simplify | src/Lib.hs | bsd-3-clause | 2,067 | 0 | 13 | 444 | 761 | 409 | 352 | 42 | 2 |
import qualified Data.List
is_int x = x == fromInteger (round x)
calc_min_path :: Integer -> Integer -> Integer -> Double
calc_min_path w l h = (sqrt . fromInteger . minimum) [
l^2 + (w+h)^2,
w^2 + (l+h)^2,
h^2 + (l+w)^2]
calc_n_int_min_paths_up_to :: Integer -> Integer
calc_n_int_min_paths_up_to m =
... | bgwines/project-euler | src/solved/problem86.hs | bsd-3-clause | 2,525 | 0 | 15 | 630 | 1,038 | 561 | 477 | 55 | 5 |
{-# LANGUAGE UnicodeSyntax #-}
module Shake.It.Rust
( module Rust
) where
import Shake.It.Rust.Cargo as Rust
| Heather/Shake.it.off | src/Shake/It/Rust.hs | bsd-3-clause | 125 | 0 | 4 | 31 | 23 | 17 | 6 | 4 | 0 |
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.Examples.IArraySpec
( spec
) where
import Test.Hspec (Spec, describe, it)
import Test.QuickCheck (NonNegative (..), Property, Small (..), property, (==>))
import Universum
import Test.Ar... | Martoon-00/toy-compiler | test/Test/Examples/IArraySpec.hs | bsd-3-clause | 4,920 | 0 | 21 | 1,716 | 1,577 | 845 | 732 | -1 | -1 |
-- |
-- Module : Crypto.Hash.MD2
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- module containing the binding functions to work with the
-- MD2 cryptographic hash.
--
{-# LANGUAGE ForeignFunctionInterface #-}
module Crypt... | nomeata/cryptonite | Crypto/Hash/MD2.hs | bsd-3-clause | 1,139 | 0 | 10 | 271 | 236 | 132 | 104 | 20 | 0 |
module LibrarySpec where
import qualified Data.Matrix as Mx
import qualified Data.Vector as Vec
import Library
import Test.Hspec
suite :: SpecWith ()
suite =
describe "Library" $ do
it "compares 0.1 + 0.2 = 0.3" $
nearZero (0.3 - (0.1 + 0.2)) `shouldBe` True
it "finds correct L∞ ... | hrsrashid/nummet | tests/LibrarySpec.hs | bsd-3-clause | 913 | 0 | 14 | 224 | 315 | 172 | 143 | 20 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-|
Module : $Header$
CopyRight : (c) 8c6794b6, 2011, 2012
License : BSD3
Maintainer : 8c6794b6@gmail.com
Stability : experimental
Portability : portable
Benchmark for comparing FFT with repa-fftw to repa-algorithms.
-}
module Main where
import Control.DeepSeq (NFData(... | 8c6794b6/repa-fftw | exec/bench.hs | bsd-3-clause | 1,499 | 0 | 19 | 344 | 506 | 287 | 219 | 31 | 1 |
module CradleSpec where
import Control.Applicative
import Data.List (isSuffixOf)
import Language.Haskell.GhcMod.Cradle
import Language.Haskell.GhcMod.Types
import System.Directory (canonicalizePath,getCurrentDirectory)
import System.FilePath ((</>), pathSeparator)
import Test.Hspec
import Dir
spec :: Spec
spec = do
... | carlohamalainen/ghc-mod | test/CradleSpec.hs | bsd-3-clause | 2,487 | 0 | 24 | 776 | 535 | 286 | 249 | 47 | 1 |
-- | This module provides automatic differentiation for Quantities.
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Numeric.Units.Dimensional.AD (FAD, diff, Lift (lift), undim, todim) ... | bjornbm/dimensional-experimental | src/Numeric/Units/Dimensional/AD.hs | bsd-3-clause | 1,353 | 0 | 12 | 236 | 350 | 202 | 148 | -1 | -1 |
-----------------------------------------------------------------------------
-- Kind: Kinds
--
-- Part of `Typing Haskell in Haskell', version of November 23, 2000
-- Copyright (c) Mark P Jones and the Oregon Graduate Institute
-- of Science and Technology, 1999-2000
--
-- This program is distributed as Free... | elben/typing-haskell-in-haskell | Kind.hs | bsd-3-clause | 1,053 | 0 | 9 | 246 | 142 | 80 | 62 | 11 | 1 |
{-# LANGUAGE Rank2Types, TypeFamilies, FlexibleContexts, UndecidableInstances #-}
import Data.Reflection -- from reflection
import Data.Monoid -- from base
import Data.Proxy -- from tagged
-- | Values in our dynamically constructed monoid over 'a'
newtype M a s = M { runM :: a } deriving (Eq,Ord)
-- | A dict... | ehird/reflection | examples/Monoid.hs | bsd-3-clause | 849 | 0 | 13 | 196 | 298 | 160 | 138 | 13 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Test interaction between parsing output and logstash
module Logstash where
import Control.Monad
import Control.Monad.Logger
import Control.Monad.Reader
import qualified Data.Aeson as Aeson
import quali... | nejla/nejla-common | tests/Logstash.hs | bsd-3-clause | 4,103 | 0 | 18 | 1,100 | 1,127 | 599 | 528 | 96 | 4 |
{-# LANGUAGE StandaloneDeriving,DeriveFunctor #-}
module Main where
import GameDSL hiding (Rule,Action)
import qualified GameDSL as GameDSL (Rule,Action)
import Graphics.Gloss
import Control.Monad (guard)
data Tag = Selected | Stone
deriving instance Eq Tag
deriving instance Ord Tag
deriving instance Show Tag
dat... | phischu/game-dsl | peg-solitaire/Main.hs | bsd-3-clause | 2,856 | 0 | 19 | 644 | 1,216 | 622 | 594 | 80 | 1 |
{-# LANGUAGE FlexibleInstances #-}
-- Algorithm for tiling the diagram with diamond calissons.
module Hexagrid.Tiling where
import Control.Arrow (first, (&&&))
import Core.Function
import Core.Math (l1dist)
import Data.Color
import Data.Entropy
impo... | misterbeebee/calisson-hs | src/Hexagrid/Tiling.hs | bsd-3-clause | 11,889 | 0 | 40 | 2,897 | 2,555 | 1,341 | 1,214 | -1 | -1 |
module Main where
import Control.Applicative
import Control.Monad
import qualified System.Environment
import Path
import Run
import qualified Paths_runstaskell
getBinDir :: IO (Path Bin)
getBinDir = Path <$> Paths_runstaskell.getBinDir
getProgName :: IO (Path ProgName)
getP... | soenkehahn/runstaskell | src/Main.hs | bsd-3-clause | 532 | 0 | 9 | 109 | 139 | 77 | 62 | 15 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -Wextra #-}
-- Development-only muffles.
{-# OPTIONS_GHC -Wno-unused-binds -Wno-unused-matches #-}
--
-- Flex: a flexbox layout implementation, based on github.com/xamarin/flex,
-- and https://www.w3.org/TR/css-flexbox-1/
--
-- Two caveats:
--
-- 1. Order propert... | deepfire/mood | src/Graphics/Flex.hs | agpl-3.0 | 24,940 | 24 | 31 | 8,899 | 7,176 | 3,796 | 3,380 | -1 | -1 |
#!/usr/bin/env stack
-- stack runghc --package universum --package lens --package lens-aeson --package time --package cassava --package split --package text --package fmt --package directory --package filepath --package megaparsec
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Multi... | input-output-hk/cardano-sl | scripts/analyze/logs.hs | apache-2.0 | 5,696 | 0 | 15 | 1,296 | 1,673 | 908 | 765 | -1 | -1 |
module Proc.Util (mkProc, mkLambda, procUtilTests) where
import Common
import Proc.Compiled
import Proc.Params
import Data.IORef
import Control.Monad.Error
import TclErr
import Util
import Internal.Types (CmdCore(..))
import qualified TclObj as T
import Test.HUnit
mkLambda :: T.TclObj -> TclM ([T.TclObj] -> TclM T.T... | strepo/hiccup | Proc/Util.hs | lgpl-2.1 | 2,159 | 0 | 15 | 638 | 689 | 348 | 341 | 59 | 5 |
module SubPatternIn1 where
data T = C1 [Int] Int [Float] | C2 Int
g :: Int -> T -> Int
g z (C1 x b c)
= case c of
c@[] -> b
c@(b_1 : b_2) -> b
g z (C1 x b c) = b
g z (C2 x) = x
f :: [Int] -> Int
f x@[] = (hd x) + (hd (tl x))
f x@((y : ys)) = (hd x) + (hd (tl x))
hd x = head x
t... | mpickering/HaRe | old/testing/introCase/SubPatternIn1AST.hs | bsd-3-clause | 334 | 0 | 10 | 130 | 240 | 127 | 113 | 14 | 2 |
{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-}
-- |Binary serialization/deserialization utilities for types used in
-- ROS messages. This module is used by generated code for .msg types.
-- NOTE: The native byte ordering of the host is used to support the
-- common scenario of same-machin... | bitemyapp/roshask | src/Ros/Internal/RosBinary.hs | bsd-3-clause | 4,152 | 0 | 12 | 817 | 1,043 | 566 | 477 | 91 | 1 |
module T15723A where
{-# INLINE foo #-}
foo :: Int -> Int
foo x = {-# SCC foo1 #-} bar x
{-# NOINLINE bar #-}
bar :: Int -> Int
bar x = x
| sdiehl/ghc | testsuite/tests/codeGen/should_compile/T15723A.hs | bsd-3-clause | 140 | 0 | 5 | 36 | 44 | 25 | 19 | -1 | -1 |
{-# LANGUAGE CPP #-}
module Vectorise.Utils.Base
( voidType
, newLocalVVar
, mkDataConTag, dataConTagZ
, mkWrapType
, mkClosureTypes
, mkPReprType
, mkPDataType, mkPDatasType
, splitPrimTyCon
, mkBuiltinCo
, wrapNewTypeBodyOfWrap
, unwrapNewTypeBodyOfWrap
, wrapNewTypeBodyOfPDataWrap
, unw... | spacekitteh/smcghc | compiler/vectorise/Vectorise/Utils/Base.hs | bsd-3-clause | 8,068 | 3 | 13 | 1,550 | 1,548 | 841 | 707 | 130 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.